home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / assert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  1.3 KB  |  71 lines

  1. /*  assert.h
  2.  
  3.     assert macro
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 9.0
  9.  *
  10.  *      Copyright (c) 1987, 1998 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14. /* $Revision:   9.3  $ */
  15.  
  16. #ifndef ___STDDEF_H
  17. #include <_stddef.h>
  18. #endif
  19.  
  20. #if !defined(RC_INVOKED)
  21.  
  22. #if defined(__STDC__)
  23. #pragma warn -nak
  24. #endif
  25.  
  26. #endif  /* !RC_INVOKED */
  27.  
  28. #ifdef __cplusplus
  29. namespace std {
  30. #endif
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. void _RTLENTRY _EXPFUNC _assert(char * __cond, char * __file, int __line);
  37.  
  38. /* Obsolete interface: __msg should be "Assertion failed: %s, file %s, line %d"
  39.  */
  40. void _RTLENTRY _EXPFUNC __assertfail(char * __msg, char * __cond,
  41.                                      char * __file, int __line);
  42.  
  43. #ifdef  __cplusplus
  44. }
  45. #endif
  46.  
  47. #ifdef __cplusplus
  48. } // std
  49. #endif /* __cplusplus */
  50.  
  51. #undef assert
  52.  
  53. #ifdef NDEBUG
  54. #define assert(p)   ((void)0)
  55. #else
  56. #define assert(p)   ((p) ? (void)0 : _assert(#p, __FILE__, __LINE__))
  57. #endif
  58.  
  59. #if !defined(RC_INVOKED)
  60.  
  61. #if defined(__STDC__)
  62. #pragma warn .nak
  63. #endif
  64.  
  65. #endif  /* !RC_INVOKED */
  66.  
  67. #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__ASSERT_H_USING_LIST)
  68. #define __ASSERT_H_USING_LIST
  69.      using std::_assert;
  70.      using std::__assertfail;
  71. #endif /* __USING_CNAME__ */